package com.gg.star.contorller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.gg.star.service.StarService;

import helpers.baseservlet.BaseServlet;
import povos.StarFruitPovo;

@WebServlet("/star/ShowAllStarsServlet")
public class ShowAllStarsServlet extends BaseServlet {
	@Autowired
	private StarService starService;
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String uid =request.getParameter("uid");
		List<StarFruitPovo>  povos= starService.showAllStarsByUid(uid);
		request.getSession().setAttribute("povos",povos);
		response.sendRedirect("/fruits/showstar.jsp");
	}


}
